package com.ydl.learning.flink.demo.transformations

import com.ydl.learning.flink.demo.Utils
import org.apache.flink.streaming.api.scala._

/**
 * mapPartition
 * 注意mapPartition只有DataSet有，DataStream没有
 *
 * @author ydl
 * @since 2020/9/21
 */
object MapPartitionDemo extends Utils {
  def main(args: Array[String]): Unit = {
    val file = readFile("/Volumes/work/code/study/learning-flink/pom.xml")
    file.mapPartition(in => Some(in.size)).print()
  }

}
